const http = require('http')

const server = http.createServer((req, res) => {
  //设置状态码
  // res.statusCode = 401
  
  //和header一起设置
  res.writeHead(503)
  res.write('11111')
  res.end('连接成功')
})

server.listen(8000, () =>{
  console.log('服务器启动成功')
})